fix: bound JDTLS startup waits - #1790
Conversation
|
Windows JVM CI did not stall in JDTLS on this PR. The finalized log shows:
This is a separate Kotlin test-quarantine gap. Kotlin is intentionally disabled on CI in I am leaving that unrelated fix out of this focused JDTLS PR. The Java evidence supports the existing conclusion: this run does not identify an upstream JDTLS/m2e defect. |
a4f2f40 to
23263a1
Compare
ae7f53f to
b474ffc
Compare
|
Closing — rationale below Thanks for your PR, but the PR's own premise undermines it: two occurrences ever, both Windows CI, same test, 0/53 reproductions, no stalled phase identified, no upstream defect found. That's not a diagnosed problem — that's an undiagnosed CI flake, and this is 245 lines of production hardening against it. Core objections:
Closing. If future evidence identifies an actual stall phase, a minimal bounded-startup change can be considered on that basis. |
Summary
ServiceReadylanguage/statusupdatels_specific_settings.java.startup_timeoutmaximum (600 seconds total by default)Why
The Windows JVM job in #1761 exhausted its 60-minute job limit with no indication of which startup wait had stalled. JDTLS can legitimately take a long time to initialize, but Serena's two required startup waits were unbounded.
A controlled watchdog canary captured Python threads, the process tree, a JDTLS JVM thread dump, phase/status history, LSP metadata, and the Eclipse workspace log. The canary showed healthy JDTLS initialization before the deliberate Python-side stall. The original test boundary was then exercised 53 times on Windows without reproducing a natural stall, so that occurrence did not identify an actionable upstream JDTLS or m2e defect.
A later natural recurrence occurred in #1811: Windows JVM run 30929370577, job 92059856781 again stopped at
test_find_symbol_references[java_model_refs]until the 60-minute job limit. Its finalized log still cannot identify the stalled startup phase, which strengthens the case for bounded, diagnostic Serena-side waits but still does not justify attributing the underlying stall to a specific upstream component.The first rebased #1790 run exposed an additional timeout-ordering issue in catch-all Ubuntu job 92087683238: the test dynamically activated a Java project, then Serena's 600-second outer tool timeout won the race against the original 600-second per-signal JDTLS timeout. The implementation now uses one total startup deadline, caps it using the existing language-server request budget, and reserves both JDTLS shutdown time and Serena's existing five-second error-propagation margin. This ensures the phase-rich JDTLS error surfaces before the generic tool timeout.
Fixes #1789. This supersedes the experimental diagnostics draft in #1786. The JDTLS workspace-cache isolation change remains separate in #1788.
Validation
Using Python 3.13.14:
uv run --no-sync pytest -q test/solidlsp/java/test_jdtls_startup_timeout.py test/solidlsp/java/test_jdtls_path_resolution.py(83 passed)Tool.apply_exand verifies the detailed phase/status error wins before the generic outer timeoutuv run --no-sync poe lintuv run --no-sync poe type-checkuv run --no-sync poe doc-buildgit diff --check